package com.neutech.controller;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import com.neutech.po.User;
import com.neutech.service.UserService;

@Controller
@RequestMapping(value="/his")
public class UserController {
	@Autowired
	private UserService userService;
	@RequestMapping("/getUserById")
	public @ResponseBody User getUser(Integer id){
		User use = userService.getUser(id);
		return use;
	}
	
	@RequestMapping("/updateUser")
	public @ResponseBody void updateUser(){
		userService.updateUser();
	}
	
	@RequestMapping("/deleteUser")
	public @ResponseBody void TestDeleteUser() {
		userService.deleteUser();
	}
	
	@RequestMapping("/addUser")
	public @ResponseBody void TestAddUser() {
		userService.addUder();
	}
}
